<div data-role="content" id="content" data-scroll="y" height="80%">
	<div data-iscroll="scroller">

		<h3><?php echo $row->title; ?></h3>
		<p><b> <?php echo "By <a href=".site_url('user_controller/show_user_profile?userID=').$row->userid.">".$row->ownerfullname,"</a>";?></b></p>
		<p><?php echo $row->detail; ?></p>
		<p><b> <?php echo "At ".$row->place. ", ".$row->areaname?></b></p>
		<p><i> <?php echo $row->date.", ".$row->time;?></i></p>
		<p> <?php echo"Guests/Quota : ".$row->number_of_guests.'/'.$row->quota; ?> </p>
		
		<?php if($row->quota>$row->number_of_guests):?>
				<?php if($row->userid!=$this->session->userdata('userid')): ?>
						<?php if(!$is_exist):?>
								<a	href="<?=site_url('feed_controller/apply?helloID=');?><?=$row->helloid?>"
									data-role="button" data-inset="true">I'll be there</a>
						<?php else :?>
								<p>You have applied it! Pls wait the owner to check</p>
						<?php endif; ?>
				<?php endif;?>
		<?php else :?>
			<p>The hello is full</p>
		<?php endif;?>
	
		<?php if($row->number_of_guests>0):?>
			<p>Confirmed:</p>
		<?php endif;?>	
		
		<?php if(isset($guests)) :$empty = true;?>
			<?php foreach($guests as $guest):if($guest->isconfirmed):?>
				<ul data-role="listview" data-inset="true"><li data-icon="false">
					<a href="<?=site_url('user_controller/show_user_profile?userID=').$guest->guestid?>"><?=$guest->guestname?></a>
				</li></ul>
			<?php else: $empty=false;endif;endforeach;?>
		
			<?php if(!$empty):?>
				<p>Waiting:</p>
			<?php endif;?>
		
			<?php foreach($guests as $guest):if(!$guest->isconfirmed):?>
				<ul data-role="listview" data-inset="true"><li data-icon="false">
					<a href="<?=site_url('user_controller/show_user_profile?userID=').$guest->guestid?>"><?=$guest->guestname?></a>
				<?php if($row->userid==$this->session->userdata('userid') && $row->quota>$row->number_of_guests):?>
					<a href="<?=site_url('feed_controller/confirm_guest?userID=').$guest->guestid."&&helloID=".$row->helloid;?>" data-role="button" data-icon="plus" class="ui-btn-right" data-inline="true" >Pick</a>
				<?php endif;?>
				</li></ul>
			<?php endif;endforeach;?>
		<?php else: ?>
			<p>No user applied for this hello yet.</p>
		<?php endif;?>
	</div>
</div>